const babelCore = require('@babel/core')

const code = `
    var foo = {
    // changed
    const: function() {},
    var: function() {}, 
    // not changed
    default: 1,
    [a]: 2,
    foo: 1,
};
`

const result = babelCore.transformSync(code, { plugins: ["@babel/plugin-transform-property-literals"]})

console.log(result.code);
